﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlNhapHangTuNCC.ascx.cs" Inherits="UserControl_ControlNhapHangTuNCC" %>
 
 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 <%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>


<style type="text/css">
        .AutoExtender
        {
            font-family: Verdana, Helvetica, sans-serif;
            font-size: .8em;
            font-weight: normal;
            border: solid 1px #006699;
            line-height: 20px;
            padding: 10px;
            background-color: White;
            margin-left:10px;
            width: 300px;
        }
        .AutoExtenderList
        {
            border-bottom: dotted 1px #006699;
            cursor: pointer;
            color: Maroon;
        }
        .AutoExtenderHighlight
        {
            color: White;
            background-color: #006699;
            cursor: pointer;
        }
        #divwidth
        {
         width: auto !important;    
        }
        #divwidth div
       {
        width: auto !important;   
       }
       #divwidthMaHangInput
       {
       	width: auto !important;  
       }
        #divwidthMaHangInput div
       {
       	width: auto !important;  
       } 
       
 </style>


<script type="text/javascript">
    function pageLoad() {
       
      

        //Lấy ngày workingday
        $.ajax({
            type: "POST",
            url: '<%=ResolveUrl("~/Webservice/WebServiceDRM.asmx/GetWorkingDay")%>',
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                $("#<%= txtDate.ClientID %>").datePicker(
		        {
		            clickInput: true,
		            startDate: data.d
		        });
            }
        });

       

        $("#<%= imgBtnAdd.ClientID %>").click(function () {
            $.blockUI({ css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
            });
        });
        $("#<%= btnSave.ClientID %>").click(function () {
            $.blockUI({ css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
            });
        });
        $("#<%= btnDelete.ClientID %>").click(function () {
            $.blockUI({ css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
            });
        });
        
    $("#<%= ImgBtnRequest.ClientID %>").click(function () {
        $.blockUI({ css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#000',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .5,
            color: '#fff'
        }
        });
    });
       

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }
    }

</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
     <div class="direct_container_right_titletop">
                     Nhận hàng từ nhà cung cấp
                </div>
                 <hr />
                <!-- Button chuc nang-->
                <div class="direct_container_main">
                    <asp:ImageButton ID="imgBtnAdd" onclick="imgBtnAdd_Click" CausesValidation="false" ImageUrl="~/Images/add.png" Width="32px" Height="32px" runat="server" />
                    <%--<asp:ImageButton ID="imgBtnSave" onclick="imgBtnSave_Click" CausesValidation="false" ImageUrl="~/Images/save.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="imgBtnDelete" onclick="imgBtnDelete_Click" CausesValidation="false" ImageUrl="~/Images/delete.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="imgBtnFind" onclick="imgBtnFind_Click" CausesValidation="false" ImageUrl="~/Images/find.png" Width="32px" Height="32px" runat="server" />--%>
                    <div style="display:none">
                        <asp:Button ID="btnDefault" runat="server" Text="Default" onclick="btnDefault_Click"/>
                    </div>                        
                </div>
                <!-- End Button chuc nang-->
                <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
            BackColor="#CCFFFF" Font-Names="Arial" 
            Width="100%">
            <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Nhập thông tin" TabIndex="0">
                 <ContentTemplate>
                     <!-- Content main-->
                <div class="direct_container_main">
                    <div class="direct_container_form_right">
                        <table border="0" width="100%">
                        
                            <tr>
                                <td colspan="4" align="center">
                                    <asp:Label ID="lblMsg" runat="server" Visible="false" BackColor="Silver" ForeColor="Blue" Font-Bold="true" Font-Italic="true"></asp:Label>
                                </td>
                            </tr>
                            
                            <tr>
                                <td width="14%" align="right"><p class="direct_label">Số nghiệp vụ</p></td>
                                <td width="86%" align="left">
                               <asp:TextBox ID="txtSoNV" ReadOnly="True" CssClass="input_code" runat="server"></asp:TextBox>

                                </td>
                            </tr>
                             <tr>
                                <td align="right"><p class="direct_label">Nhà cung cấp</p></td>
                                <td>
                                    <asp:DropDownList ID="ddlNCC" runat="server"></asp:DropDownList>

                                </td>
                            </tr>
                            <tr>
                                <td align="right"><p class="direct_label">Ngày</p></td>
                                <td align="left">
                                    <asp:TextBox ID="txtDate" CssClass="input_code" runat="server"></asp:TextBox>
                                    
                                </td>
                            </tr>
                           
                     
                         
                            <tr>
                                <td colspan="2">                                
                                    <asp:GridView ID="grvProduct" runat="server" AutoGenerateColumns="False" 
                                        onrowcancelingedit="grvProduct_RowCancelingEdit" ShowFooter="True"
                                        onrowediting="grvProduct_RowEditing" onrowupdating="grvProduct_RowUpdating" 
                                        onrowdeleting="grvProduct_RowDeleting" DataKeyNames="Mã hàng" EnableModelValidation="True" 
                                        onrowdatabound="grvProduct_RowDataBound1">
                                        <Columns>
                                                <asp:TemplateField HeaderText="Stt">
                                                    <HeaderTemplate>STT</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <%# Container.DataItemIndex + 1 %>                                                                
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField HeaderText="Mã hàng">
                                                    <HeaderTemplate> Mã hàng</HeaderTemplate>
                                                    <ItemTemplate>                                                    
                                                        <asp:Label ID="lblMaHang" runat="server" Text='<%# Eval("Mã hàng")%>'></asp:Label>                                               
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                                                    
                                                    <FooterTemplate>
                                                        <asp:TextBox ID="txtMaHangInput" runat="server" Width="97%" AutoPostBack="true" TabIndex="5" OnTextChanged="txtMaHangInput_TextChanged"></asp:TextBox>
                                                        <div id="divwidthMaHangInput" style="overflow:scroll;height:85px;display:none"></div>
                                                        <cc1:AutoCompleteExtender ID="txtMaHangInput_AutoCompleteExtender" 
                                                            runat="server"
                                                            ServiceMethod="GetMatHangInfoWithContextKey" ServicePath="~/Webservice/WebServiceDRM.asmx" 
                                                            TargetControlID="txtMaHangInput"
                                                            MinimumPrefixLength="1" 
                                                            CompletionInterval="10"
                                                            EnableCaching="True"
                                                            CompletionSetCount="12"                             
                                                            CompletionListCssClass="AutoExtender"
                                                            CompletionListItemCssClass="AutoExtenderList"
                                                            CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                                            CompletionListElementID="divwidthMaHangInput">
                                                        </cc1:AutoCompleteExtender>
                                                                                               
                                                    </FooterTemplate>
                                                    <%--<FooterStyle VerticalAlign="Middle" /> --%>                                               
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField HeaderText="Tên hàng">
                                                    <HeaderTemplate>Tên hàng</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblTenHang" runat="server" Text='<%# Eval("Tên hàng")%>'></asp:Label>                                             
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="200px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />                                                
                                                    
                                                    <FooterTemplate>
                                                        <asp:TextBox ID="txtTenHangInput" runat="server" Width="97%" ReadOnly="true"></asp:TextBox>                                            
                                                    </FooterTemplate>
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField HeaderText="Số lượng">
                                                    <EditItemTemplate>
                                                         <asp:TextBox ID="txtSL" CssClass="input_code" Text='<%# Eval("Số lượng")%>' runat="server"></asp:TextBox>
                                                         <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtenderSLEdit" 
                                                            runat="server" Enabled="True" FilterType="Numbers" 
                                                            TargetControlID="txtSL">
                                                         </cc1:FilteredTextBoxExtender>
                                                    </EditItemTemplate>
                                                    <HeaderTemplate>Số lượng</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSL" runat="server" Text='<%# Eval("Số lượng")%>'></asp:Label>                                                   
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="70px" />
                                                    
                                                    <FooterTemplate>
                                                        <asp:TextBox ID="txtSoLuongInput" runat="server" AutoPostBack="True" 
                                                            ontextchanged="txtSoLuongInput_TextChanged" Width="97%"></asp:TextBox>
                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtenderSLInput" 
                                                            runat="server" Enabled="True" FilterType="Numbers" 
                                                            TargetControlID="txtSoLuongInput">
                                                        </cc1:FilteredTextBoxExtender>
                                                    </FooterTemplate>
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField HeaderText="Đơn giá">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txtDG" CssClass="input_code" Text='<%# Eval("Đơn giá")%>' runat="server"></asp:TextBox>
                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtenderDGEdit" 
                                                            runat="server" Enabled="True" FilterType="Numbers" 
                                                            TargetControlID="txtDG">
                                                         </cc1:FilteredTextBoxExtender>
                                                    </EditItemTemplate>
                                                    <HeaderTemplate>Đơn giá</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblDG" runat="server" Text='<%# Eval("Đơn giá")%>'></asp:Label>                                                   
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="70px" />
                                                
                                                    <FooterTemplate>
                                                        <asp:TextBox ID="txtDonGiaInput" runat="server" AutoPostBack="True" 
                                                            ontextchanged="txtDonGiaInput_TextChanged" Width="97%"></asp:TextBox>
                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtenderDGInput" 
                                                            runat="server" Enabled="True" FilterType="Numbers" 
                                                            TargetControlID="txtDonGiaInput">
                                                        </cc1:FilteredTextBoxExtender>
                                                    </FooterTemplate>
                                                </asp:TemplateField>
                                                    
                                                <asp:TemplateField HeaderText="Chiết khấu">
                                                    <EditItemTemplate>
                                                        <asp:TextBox ID="txtCK" CssClass="input_code" Text='<%# Eval("Chiết khấu")%>' runat="server"></asp:TextBox>
                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCK" 
                                                            runat="server" Enabled="True" FilterType="Numbers" 
                                                            TargetControlID="txtCK">
                                                        </cc1:FilteredTextBoxExtender>
                                                    </EditItemTemplate>
                                                    <HeaderTemplate>Chiết khấu</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCK" runat="server" Text='<%# Eval("Chiết khấu")%>'></asp:Label>                                                   
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="70px" />
                                                
                                                    <FooterTemplate>
                                                        <asp:TextBox ID="txtChietKhauInput" runat="server" AutoPostBack="True" 
                                                            ontextchanged="txtChietKhauInput_TextChanged" Width="97%"></asp:TextBox>
                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtenderCKInput" 
                                                            runat="server" Enabled="True" FilterType="Numbers" 
                                                            TargetControlID="txtChietKhauInput">
                                                         </cc1:FilteredTextBoxExtender>
                                                    </FooterTemplate>
                                                </asp:TemplateField>
                                                                                                    
                                                <asp:TemplateField HeaderText="ST Chiết khấu">
                                                    <HeaderTemplate>ST Chiết khấu</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblTienCK" runat="server" Text='<%# Eval("Tiền chiết khấu")%>'></asp:Label>                                                   
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="70px" />
                                                    
                                                    <FooterTemplate>
                                                        <asp:Label ID="lblSTChietKhauInput" runat="server" Text=""></asp:Label>
                                                        <%--<asp:TextBox ID="txtSTChietKhauInput" runat="server" Width="97%" ReadOnly="true"></asp:TextBox> --%>
                                                    </FooterTemplate>
                                                    
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField HeaderText="Thành tiền">
                                                    <HeaderTemplate>Thành tiền</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblThanhTien" runat="server" Text='<%# Eval("Thành tiền")%>'></asp:Label>                                               
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="70px" />
                                                    <FooterTemplate>
                                                        <asp:Label ID="lblThanhTienInput" runat="server" Text=""></asp:Label>
                                                        <%--<asp:TextBox ID="txtThanhTienInput" runat="server" Width="97%" ReadOnly="true"></asp:TextBox>--%>                                            
                                                    </FooterTemplate>
                                                </asp:TemplateField>

                                                <asp:TemplateField HeaderText="Giá mua lần cuối">
                                                    <HeaderTemplate>Giá mua lần cuối</HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblLastCost" runat="server" Text='<%# Eval("Giá mua lần cuối")%>'></asp:Label>                                               
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Left" Width="70px" />
                                                    <ItemStyle Height="40px" HorizontalAlign="Left" Width="70px" />
                                                    <FooterTemplate>
                                                         <asp:Label ID="lblGiaMuaLanCuoiInput" runat="server" Text=""></asp:Label>
                                                        <%--<asp:TextBox ID="txtGiaMuaLanCuoiInput" runat="server" Width="97%" ReadOnly="true"></asp:TextBox> --%>
                                                    </FooterTemplate>
                                                </asp:TemplateField>
                                                
                                                <%--<asp:CommandField CausesValidation="False" HeaderText="Sửa" 
                                                    ShowEditButton="True" ButtonType="Image"
                                                    EditImageUrl="~/images/repair_bt.png" EditText="Sửa" 
                                                    CancelImageUrl="~/images/exit_bt.png" CancelText="Thoát" UpdateText="Cập nhập" 
                                                    UpdateImageUrl="~/images/update_bt.png" >
                                                    <ControlStyle Height="25px" Width="25px" />
                                                    <ItemStyle Height="25px" Width="25px" />                                                    
                                                </asp:CommandField>--%>
                                                
                                                
                                                <asp:TemplateField ShowHeader="True" HeaderText="Sửa" HeaderStyle-Width="16px" HeaderStyle-HorizontalAlign="Center">
                                                    <EditItemTemplate>
                                                    <div align="right">
                                                        <asp:LinkButton ID="LinkButtonUpdate" runat="server"
                                                            CausesValidation="false" CommandName="Update">
                                                            <asp:Image ID="imgUpdate" runat="server"
                                                                ImageUrl="~/images/update_bt.png"
                                                                AlternateText="Cập nhật" Width="25px" />
                                                        </asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButtonCancel" runat="server"
                                                            CausesValidation="False" CommandName="Cancel">
                                                            <asp:Image ID="imgCancel" runat="server"
                                                                 ImageUrl="~/images/exit_bt.png"
                                                                 AlternateText="Hủy bỏ" Width="25px" />
                                                        </asp:LinkButton>
                                                    </div>
                                                    </EditItemTemplate>
                                                    <ItemTemplate>
                                                    <div align="right">
                                                        <asp:LinkButton ID="LinkButtonEdit" runat="server" 
                                                            CausesValidation="False" CommandName="Edit">
                                                            <asp:Image ID="imgEdit" runat="server"
                                                                 ImageUrl="~/images/repair_bt.png"
                                                                 AlternateText="Sửa" />
                                                        </asp:LinkButton>
                                                    </div>
                                                    </ItemTemplate>
                                                    <FooterStyle VerticalAlign="Top" />
                                                    <HeaderStyle Width="16px" />
                                                    <FooterTemplate>
                                                    <div align="right">
                                                        <%--<asp:LinkButton ID="btnAddRow" runat="server" 
                                                            CausesValidation="true" CommandName="Insert" 
                                                            OnClick="btnAddRow_Click" >
                                                            <asp:Image ID="imgInsert" runat="server" 
                                                                 ImageUrl="../WebMaster/Images/New File16.png" 
                                                                 AlternateText="Thêm" />
                                                        </asp:LinkButton>--%>
                                                        <asp:Button ID="btnAddItem" runat="server" Text="Thêm" CausesValidation="true" CommandName="AddRow" onclick="btnAddItem_Click"/>
                                                    </div>
                                                    </FooterTemplate>
                                                    <ItemStyle Width="20px" />
                                                </asp:TemplateField>
                                                
                                                
                                                <asp:CommandField  ButtonType="Image" DeleteText="Xóa" 
                                                    DeleteImageUrl="~/images/delete.png" CausesValidation="False" HeaderText="Xóa" 
                                                    ShowDeleteButton="True" >
                                                    <ControlStyle Height="25px" Width="25px" />
                                                    <ItemStyle Height="25px" Width="25px" />
                                                </asp:CommandField>
                                            </Columns>
                                        </asp:GridView>
                                </td>
                            </tr>
                             <tr>
                                <td align="right"><p class="direct_label">Tổng tiền chiết khấu</p></td>
                                <td align="left">
                                  <%--<asp:TextBox ID="txtDiscAmt" Text="0" ReadOnly="True" CssClass="input_code" runat="server"></asp:TextBox>--%>
                                    <asp:Label ID="txtDiscAmt" runat="server" Text="0"></asp:Label>

                                </td>
                            </tr>
                            <tr>
                                <td align="right"><p class="direct_label">Tổng tiền HĐ sau chiết khấu</p></td>
                                <td align="left">
                                   <%-- <asp:TextBox ID="txtDocTot" Text="0" ReadOnly="True" CssClass="input_code" runat="server"></asp:TextBox>--%>
                                    <asp:Label ID="txtDocTot" runat="server" Text="0"></asp:Label>
                                    <asp:Button ID="btnSave" runat="server" Text="Lưu" onclick="btnSave_Click"/>
                                    
                                    <asp:Button ID="btnDelete" runat="server" Text="Xóa" onclick="btnDelete_Click"/>
                                    
                                </td>
                            </tr>

                        </table>
                    </div>
                </div>
                <!-- EndContent main-->
                 </ContentTemplate>
            </cc1:TabPanel>
             <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Các hóa đơn đã nhập" TabIndex="1">
                <ContentTemplate>
                 <!-- Content search-->
                <div class="direct_container_main">
                    <div class="direct_container_form_right">
                          <table border="0" width="100%">
                                <tr>
                                    <td style="width:200px">
                                        <p class="direct_legend">Thông tin cần tìm</p>                                        
                                    </td>
                                    <td align="left">
                                        <asp:ImageButton ID="ImgBtnRequest" onclick="ImgBtnRequest_Click" CausesValidation="false" ImageUrl="~/Images/Refresh.png" Width="32px" Height="32px" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                       <asp:GridView ID="grvSearch" runat="server" PageSize="10" AutoGenerateColumns="False" 
                                        AllowPaging="true"
                                                        DataKeyNames="vouchno" EnableModelValidation="True"
                                                         onpageindexchanging="grvSearch_PageIndexChanging" 
                                                        onrowcommand="grvSearch_RowCommand">
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Stt">
                                                                <HeaderTemplate>
                                                                    STT
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Số nghiệp vụ">
                                                                <HeaderTemplate>
                                                                    Số nghiệp vụ
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                   
                                                                    <asp:Label ID="lblSoNV" runat="server" Text='<%# Eval("vouchno")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                                                            </asp:TemplateField>
                                                      
                                                            <asp:TemplateField HeaderText="Nhà cung cấp">
                                                                <HeaderTemplate>
                                                                    Nhà cung cấp
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <%# Eval("vendorname")%>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                                                            </asp:TemplateField>
                                                             <asp:TemplateField HeaderText="Ngày phát sinh">
                                                                <HeaderTemplate>
                                                                    Ngày phát sinh
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <%# Eval("invdate")%>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                                                            </asp:TemplateField>
                                                             <asp:TemplateField>
                                                                 <ItemTemplate>
                                                                    <asp:ImageButton ID="imgBtnChon" runat="server" CausesValidation="False" 
                                                                    CommandName="chon" Height="25px" Width="25px" ImageUrl="~/Images/check.png" />
                                                                </ItemTemplate>
                                                                <ControlStyle BackColor="White" BorderColor="White" />
                                                                <FooterStyle BackColor="White" BorderColor="White" />
                                                                <HeaderStyle BackColor="White" BorderColor="White" />
                                                                <ItemStyle BackColor="White" BorderColor="White" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                        
                                        </td>
                                </tr>                                
                         </table>
                    </div>

                </div>
                <!-- End Content search-->
                </ContentTemplate>
            </cc1:TabPanel>
            </cc1:TabContainer>
            <dxpc:ASPxPopupControl ID="MessageBox" PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="WindowCenter" Font-Bold="true" HeaderText="DRM-S" runat="server" Height="91px" 
        Width="601px">
        <ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True"></dxpc:PopupControlContentControl>
</ContentCollection>
    </dxpc:ASPxPopupControl>
    </ContentTemplate>
</asp:UpdatePanel>
